/**
 * Copyright &copy; 2012-2016 <a href="https://github.com/thinkgem/jeesite">JeeSite</a> All rights reserved.
 */
package com.longview.io.modules.sms.entity;

import org.hibernate.validator.constraints.Length;
import java.util.Date;
import com.fasterxml.jackson.annotation.JsonFormat;

import com.longview.io.common.persistence.DataEntity;

/**
 * 短信验证码Entity
 * @author 张飞
 * @version 2017-03-27
 */
public class SmsInfo extends DataEntity<SmsInfo> {
	
	private static final long serialVersionUID = 1L;
	private String mobile;		// 手机号
	private String vCode;		// 验证码
	private Date sendTime;		// 发送时间
	private Date invalidTime;		// 失效时间
	private String state;		// 状态
	private String zjUserId;		// 用户Id
	
	public SmsInfo() {
		super();
	}

	public SmsInfo(String id){
		super(id);
	}

	@Length(min=0, max=50, message="长度必须介于 0 和 50 之间")
	public String getUserinfoid() {
		return mobile;
	}
	
	@Length(min=0, max=15, message="手机号长度必须介于 0 和 15 之间")
	public String getMobile() {
		return mobile;
	}

	public void setMobile(String mobile) {
		this.mobile = mobile;
	}
	
	@Length(min=0, max=10, message="验证码长度必须介于 0 和 10 之间")
	public String getVCode() {
		return vCode;
	}

	public void setVCode(String vCode) {
		this.vCode = vCode;
	}
	
	@JsonFormat(pattern = "yyyy-MM-dd HH:mm:ss")
	public Date getSendTime() {
		return sendTime;
	}

	public void setSendTime(Date sendTime) {
		this.sendTime = sendTime;
	}
	
	@JsonFormat(pattern = "yyyy-MM-dd HH:mm:ss")
	public Date getInvalidTime() {
		return invalidTime;
	}

	public void setInvalidTime(Date invalidTime) {
		this.invalidTime = invalidTime;
	}
	
	@Length(min=0, max=11, message="状态长度必须介于 0 和 11 之间")
	public String getState() {
		return state;
	}

	public void setState(String state) {
		this.state = state;
	}
	
}